Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Add  the  Date  a  Picture  Was  Taken  to  the  File  Names  of  My  Digital  Photos  

 Content of Add the Date a Picture Was Taken to the File Names of My Digital Photos.vbs
MD5 Hash: FCE44769FCEA15E08D7CA3A05E6FAF5C
On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

objConnection.Open "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"

objRecordSet.Open "SELECT System.ItemPathDisplay, System.Photo.DateTaken FROM SYSTEMINDEX Where System.ItemFolderPathDisplay = 'C:\Test'", _
objConnection

objRecordSet.MoveFirst

Do Until objRecordset.EOF
strName = objRecordset.Fields.Item("System.ItemPathDisplay")
arrName = Split(strName, ".")

dtmPhotoDate = objRecordset.Fields.Item("System.Photo.DateTaken")
strDay = Day(dtmPhotoDate)
strMonth = Month(dtmPhotoDate)
strYear = Year(dtmPhotoDate)
strNewName = arrName(0) & "_" & strMonth & "_" & strDay & "_" & strYear & "." & arrName(1)

objFSO.MoveFile strName , strNewName
objRecordset.MoveNext
Loop



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a